package com.springBootStudy.mybatis.mapper;

import com.springBootStudy.mybatis.pojo.MybatisUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

//注意 一定要加  @Mapper !!!
@Mapper
public interface MybatisUserMapper{

    List<MybatisUser> selectMybatisUser(int id);

    //@Select("select * from mybatisstudy")
    //查出结果为 MybatisUser(id=1, name=狂神, password=null)
    @Select("select id,name,pwd as password from mybatisstudy")
    List<MybatisUser> findAll();
}
